/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package co.edu.eam.clinica.vista.gui.common;

import javax.swing.JInternalFrame;
import javax.swing.JPanel;

/**
 *
 * @author Camilo Andres
 */
public class VentanaPrincipalManager {
    
    private static VentanaPrincipalManager manager;
    private static VentanaPrincipal ventana;
    
    private VentanaPrincipalManager(){
        ventana=new VentanaPrincipal();
        ventana.setVisible(true);
    }
    /**
     * metodo para dar una instancia singleton de esta clase
     * @return 
     */
    public static VentanaPrincipal getVentanaPrincipal(){
        
        if(manager==null){
            manager=new VentanaPrincipalManager();
        }
        return manager.ventana;
    }
    /**
     * Agregar una ventana a la principal.
     * @param panel 
     */
    public static void agregarVentana(PanelOncologos panel){
        ventana.agregarVentana(panel);
    }
    
}
